InitPersistentObject
TheInitPersistentObject
method initializes this newly created persistent object.
void InitPersistentObject (in ODStorageUnit storageUnit);
storageUnit
- A reference to a storage unit of this persistent object.
DISCUSSION
Your part editor should never call this method directly; it is called automatically whenever a persistent object is created for the first time. Every existing OpenDoc subclass ofODPersistentObject
(includingODPart
) has an initialization method that calls the inheritedInitPersistentObject
method at the beginning of its implementation.For example, the initialization method of
ODPart
is theInitPart
method. When you call the draft'sCreatePart
method to create a part of your class, that factory method calls your part'sInitPart
method. Your part'sInitPart
method should call the inheritedInitPart
method, which calls theInitPersistentObject
method.The
InitPersistentObject
method is not called when a stored object is re-created. Instead, theInitPersistentObjectFromStorage
method is called to restore the object to its state at the time it was last saved.SEE ALSO
TheODPart::InitPart
method (page 528).
TheODPersistentObject::Externalize
method (page 558).
TheODPersistentObject::InitPersistentObjectFromStorage
method (page 561).
"The InitPart Method" on page 293 in OpenDoc Programmer's Guide.
"The InitPartFromStorage Method" on page 294 in OpenDoc Programmer's Guide.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help